# -*- coding:utf-8 -*-

import random

listw = []

#获取牛逼次
def getNbw():
    if(len(listw) == 0):
        initList()
        return getNbw()
    rindex = random.randint(0, len(listw))
    return listw[rindex]

def initList():
    print("初始化 名言")
    with open(r"utils/conifg/zlmy.txt", "r", encoding="utf-8") as f:
        ll = f.readlines()
        for l in ll :
            if l != '' and l != '\n':
                listw.append(l.replace('\n',''))
        print(listw)
    pass

if __name__ == '__main__':
    print(getNbw())